home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / catman / p_man / cat3 / qboxlayout.Z / qboxlayout
Encoding:
Text File  |  1998-10-28  |  16.5 KB  |  331 lines

  1.  
  2.  
  3.  
  4.      QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))    QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt((((3333qqqqtttt))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       QBoxLayout - Lines up    child widgets horizontally or
  10.       vertically
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.       #include <qlayout.h>
  14.  
  15.       Inherits QLayout.
  16.  
  17.       Inherited by QHBoxLayout and QVBoxLayout.
  18.  
  19.     PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
  20.       QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt (((( QQQQWWWWiiiiddddggggeeeetttt **** _p_a_r_e_n_t,,,, DDDDiiiirrrreeeeccccttttiiiioooonnnn,,,, iiiinnnntttt    _b_o_r_d_e_r====0000,,,, iiiinnnntttt
  21.           _a_u_t_o_B_o_r_d_e_r
  22.       QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt (((( DDDDiiiirrrreeeeccccttttiiiioooonnnn,,,, iiiinnnntttt _a_u_t_o_B_o_r_d_e_r ==== ----1111,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****
  23.           _n_a_m_e====0000 ))))
  24.       ~~~~QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt ()
  25.       vvvvooooiiiidddd aaaaddddddddSSSSppppaaaacccciiiinnnngggg (((( iiiinnnntttt    ssssiiiizzzzeeee ))))
  26.       vvvvooooiiiidddd aaaaddddddddSSSSttttrrrreeeettttcccchhhh (((( iiiinnnntttt    _s_t_r_e_t_c_h    ==== 0000 ))))
  27.       vvvvooooiiiidddd aaaaddddddddWWWWiiiiddddggggeeeetttt (((( QQQQWWWWiiiiddddggggeeeetttt ****,,,, iiiinnnntttt _s_t_r_e_t_c_h ==== 0000,,,, iiiinnnntttt _a_l_i_g_n_m_e_n_t ====
  28.           AAAAlllliiiiggggnnnnCCCCeeeennnntttteeeerrrr ))))
  29.       vvvvooooiiiidddd aaaaddddddddLLLLaaaayyyyoooouuuutttt (((( QQQQLLLLaaaayyyyoooouuuutttt **** _l_a_y_o_u_t,,,, iiiinnnntttt _s_t_r_e_t_c_h ==== 0000 ))))
  30.       DDDDiiiirrrreeeeccccttttiiiioooonnnn ddddiiiirrrreeeeccccttttiiiioooonnnn (((()))) ccccoooonnnnsssstttt
  31.       vvvvooooiiiidddd aaaaddddddddSSSSttttrrrruuuutttt    (((( iiiinnnntttt ))))
  32.  
  33.     PPPPrrrrooootttteeeecccctttteeeedddd MMMMeeeemmmmbbbbeeeerrrrssss
  34.       vvvviiiirrrrttttuuuuaaaallll QQQQCCCChhhhaaaaiiiinnnn**** mmmmaaaaiiiinnnnVVVVeeeerrrrttttiiiiccccaaaallllCCCChhhhaaaaiiiinnnn (((())))
  35.       vvvviiiirrrrttttuuuuaaaallll QQQQCCCChhhhaaaaiiiinnnn**** mmmmaaaaiiiinnnnHHHHoooorrrriiiizzzzoooonnnnttttaaaallllCCCChhhhaaaaiiiinnnn (((())))
  36.       vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd iiiinnnniiiittttGGGGMMMM (((())))
  37.  
  38.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  39.       The QBoxLayout class lines up    child widgets horizontally or
  40.       vertically.
  41.  
  42.       QBoxLayout takes the space it    gets (from its parent layout
  43.       or from the mainWindget()), divides it up into a row of
  44.       boxes    and makes each managed widget fill one box.
  45.  
  46.       If the QBoxLayout is Horizontal, the boxes are beside    each
  47.       other, with suitable sizes. Each widget (or other box) will
  48.       get at least its minimum sizes and at    most its maximum size,
  49.       and any excess space is shared according to the stretch
  50.       factors (more    about that below).
  51.  
  52.       If the QBoxLayout is Vertical, the boxes are above and below
  53.       each other, again with suitable sizes.
  54.  
  55.       The easiest way to create a QBoxLayout is to use one of the
  56.       convenience classes QHBoxLayout (for Horizontal boxes) or
  57.       QVBoxLayout (for Vertical boxes). You    can also use the
  58.       QBoxLayout constuctor    directly, specifying its direction as
  59.       LeftToRight, Down, RightToLeft or Up.
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 9/22/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))    QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt((((3333qqqqtttt))))
  71.  
  72.  
  73.  
  74.       If the QBoxLayout is not the top-level layout    (ie. is    not
  75.       managing all of the widget's area and    children), you must
  76.       add it to its    parent layout before you can do    anything with
  77.       it. The normal way to    add a layout is    by calling
  78.       parentLayout->addLayout().
  79.  
  80.       Once you have    done that, you can add boxes to    the QBoxLayout
  81.       using    one of four functions:
  82.  
  83.  
  84.  
  85.      widget's stretch factor. (The stretch factor is along the row if
  86.      boxes.)
  87.       addWidget() to add a widget to the QBoxLayout    and set    the
  88.  
  89.  
  90.  
  91.      you use to    create nice and    spacious dialogs. See below for    ways
  92.      to    set margins.
  93.       addSpacing() to create an empty box; this is one of the functions
  94.  
  95.  
  96.  
  97.       addStretch() to create an empty, stretchable box.
  98.  
  99.  
  100.  
  101.      and set that layout's stretch factor.
  102.       addLayout() to add a box containing another QLayout to the row
  103.  
  104.  
  105.  
  106.       Finally, if the layout is a top-level    one, you activate()
  107.       it.
  108.  
  109.       QBoxLayout also includes two margin widths: The border width
  110.       and the inter-box width. The border width is the width of
  111.       the reserved space along each    of the QBoxLayout's four
  112.       sides. The intra-widget width    is the width of    the
  113.       automatically    allocated spacing between neighbouring boxes.
  114.       (You can use addSpacing() to get more    space.)
  115.  
  116.       The border width defaults to 0, and the intra-widget width
  117.       defaults to the same as the border width. Both are set using
  118.       arguments to the constructor.
  119.  
  120.       You will almost always want to use the convenience classes
  121.       for QBoxLayout: QVBoxLayout and QHBoxLayout, because of
  122.       their    simpler    constructors.
  123.  
  124.       Examples:  pref/pref.cpp layout/layout.cpp
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 9/22/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))    QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt((((3333qqqqtttt))))
  137.  
  138.  
  139.  
  140.      MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  141.      QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt (((( QQQQWWWWiiiiddddggggeeeetttt ****    ppppaaaarrrreeeennnntttt,,,,    DDDDiiiirrrreeeeccccttttiiiioooonnnn dddd,,,, iiiinnnntttt
  142.       bbbboooorrrrddddeeeerrrr====0000,,,, iiiinnnntttt    aaaauuuuttttooooBBBBoooorrrrddddeeeerrrr ==== ----1111,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr **** nnnnaaaammmmeeee====0000 ))))
  143.       Creates a new    QBoxLayout with    direction _d and    main widget
  144.       _p_a_r_e_n_t. _p_a_r_e_n_t may not be 0.
  145.  
  146.       _b_o_r_d_e_r is the    number of pixels between the edge of the
  147.       widget and the managed children. _a_u_t_o_B_o_r_d_e_r is the default
  148.       number of pixels between neighbouring    children. If
  149.       _a_u_t_o_B_o_r_d_e_r is    -1 the value of    _b_o_r_d_e_r is used.
  150.  
  151.       _n_a_m_e is the internal object name
  152.  
  153.       See also: direction().
  154.  
  155.       Examples:  layout/layout.cpp
  156.  
  157.      QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt (((( DDDDiiiirrrreeeeccccttttiiiioooonnnn    dddd,,,, iiiinnnntttt aaaauuuuttttooooBBBBoooorrrrddddeeeerrrr ==== ----1111,,,,    ccccoooonnnnsssstttt
  158.       cccchhhhaaaarrrr **** nnnnaaaammmmeeee====0000    ))))
  159.       If _a_u_t_o_B_o_r_d_e_r    is -1, this QBoxLayout will inherit its
  160.       parent's defaultBorder(), otherwise _a_u_t_o_B_o_r_d_e_r is used.
  161.  
  162.       You have to insert this box into another layout before using
  163.       it.
  164.  
  165.      QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::~~~~QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt (((())))
  166.       Destroys this    box.
  167.  
  168.      vvvvooooiiiidddd QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::aaaaddddddddLLLLaaaayyyyoooouuuutttt    (((( QQQQLLLLaaaayyyyoooouuuutttt **** llllaaaayyyyoooouuuutttt,,,, iiiinnnntttt    ssssttttrrrreeeettttcccchhhh    ==== 0000 ))))
  169.       Adds _l_a_y_o_u_t to the box, with serial stretch factor _s_t_r_e_t_c_h.
  170.  
  171.       See also: addWidget()    and addSpacing().
  172.  
  173.       Examples:  pref/pref.cpp layout/layout.cpp
  174.       widgets/widgets.cpp
  175.  
  176.      vvvvooooiiiidddd QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::aaaaddddddddSSSSppppaaaacccciiiinnnngggg (((( iiiinnnntttt ssssiiiizzzzeeee ))))
  177.       Adds a non-stretchable space with size _s_i_z_e. QBoxLayout
  178.       gives    default    border and spacing. This function adds
  179.       additional space.
  180.  
  181.       See also: addStretch().
  182.  
  183.       Examples:  widgets/widgets.cpp
  184.  
  185.      vvvvooooiiiidddd QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::aaaaddddddddSSSSttttrrrreeeettttcccchhhh (((( iiiinnnntttt ssssttttrrrreeeettttcccchhhh ==== 0000 ))))
  186.       Adds a stretchable space with    zero minimum size and stretch
  187.       factor _s_t_r_e_t_c_h.
  188.  
  189.       See also: addSpacing().
  190.  
  191.       Examples:  pref/pref.cpp widgets/widgets.cpp
  192.  
  193.  
  194.  
  195.      Page 3                         (printed 9/22/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))    QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt((((3333qqqqtttt))))
  203.  
  204.  
  205.  
  206.      vvvvooooiiiidddd QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::aaaaddddddddSSSSttttrrrruuuutttt (((( iiiinnnntttt ssssiiiizzzzeeee ))))
  207.       Limits the perpendicular dimension of    the box    (e.g. height
  208.       if the box is    LeftToRight) to    a minimum of _s_i_z_e. Other
  209.       constraints may increase the limit.
  210.  
  211.      vvvvooooiiiidddd QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::aaaaddddddddWWWWiiiiddddggggeeeetttt    (((( QQQQWWWWiiiiddddggggeeeetttt **** wwwwiiiiddddggggeeeetttt,,,, iiiinnnntttt    ssssttttrrrreeeettttcccchhhh    ==== 0000,,,,
  212.       iiiinnnntttt aaaalllliiiiggggnnnn ==== AAAAlllliiiiggggnnnnCCCCeeeennnntttteeeerrrr ))))
  213.       Adds _w_i_d_g_e_t to the box, with stretch factor _s_t_r_e_t_c_h and
  214.       alignment _a_l_i_g_n.
  215.  
  216.       The stretch factor applies only in the direction of the
  217.       QBoxLayout, and is relative to the other boxes and widgets
  218.       in this QBoxLayout. Widgets and boxes    with higher stretch
  219.       factor grow more.
  220.  
  221.       If the stretch factor    is 0 and nothing else in the
  222.       QBoxLayout can grow at all, the widget may still grow    up to
  223.       its maximum size.
  224.  
  225.       Alignment is perpendicular to    direction(), alignment in the
  226.       serial direction is done with    addStretch().
  227.  
  228.       For horizontal boxes,    the possible alignments    are
  229.  
  230.       AlignCenter centers vertically in the    box.
  231.  
  232.       AlignTop aligns to the top border of the box.
  233.  
  234.       AlignBottom aligns to    the bottom border of the box.
  235.  
  236.       For vertical boxes, the possible alignments are
  237.  
  238.       AlignCenter centers horizontally in the box.
  239.  
  240.       AlignLeft aligns to the left border of the box.
  241.  
  242.       AlignRight aligns to the right border    of the box.
  243.  
  244.       Alignment only has effect if the size    of the box is greater
  245.       than the widget's maximum size.
  246.  
  247.       See also: addLayout()    and addSpacing().
  248.  
  249.       Examples:  pref/pref.cpp layout/layout.cpp
  250.       widgets/widgets.cpp
  251.  
  252.      QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::DDDDiiiirrrreeeeccccttttiiiioooonnnn QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::ddddiiiirrrreeeeccccttttiiiioooonnnn(((()))) ccccoooonnnnsssstttt
  253.       Returns the (serial) direction of the    box. addWidget(),
  254.       addBox() and addSpacing() works in this direction; the
  255.       stretch stretches in this direction. Alignment works
  256.       perpendicular    to this    direction.
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                         (printed 9/22/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))    QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt((((3333qqqqtttt))))
  269.  
  270.  
  271.  
  272.       The directions are LeftToRight, RightToLeft, TopToBottom and
  273.       BottomToTop. For the last two, the shorter aliases Down and
  274.       Up are also available.
  275.  
  276.       See also: addWidget(), addBox() and addSpacing().
  277.  
  278.      vvvvooooiiiidddd QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::iiiinnnniiiittttGGGGMMMM (((())))    [[[[vvvviiiirrrrttttuuuuaaaallll pppprrrrooootttteeeecccctttteeeedddd]]]]
  279.       Initializes this box.
  280.  
  281.       Reimplemented    from QLayout.
  282.  
  283.      QQQQCCCChhhhaaaaiiiinnnn **** QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::mmmmaaaaiiiinnnnHHHHoooorrrriiiizzzzoooonnnnttttaaaallllCCCChhhhaaaaiiiinnnn (((()))) [[[[vvvviiiirrrrttttuuuuaaaallll pppprrrrooootttteeeecccctttteeeedddd]]]]
  284.       Returns the main horizontal chain, so    that a box can be put
  285.       into other boxes (or other types of QLayout).
  286.  
  287.       Reimplemented    from QLayout.
  288.  
  289.      QQQQCCCChhhhaaaaiiiinnnn **** QQQQBBBBooooxxxxLLLLaaaayyyyoooouuuutttt::::::::mmmmaaaaiiiinnnnVVVVeeeerrrrttttiiiiccccaaaallllCCCChhhhaaaaiiiinnnn (((()))) [[[[vvvviiiirrrrttttuuuuaaaallll    pppprrrrooootttteeeecccctttteeeedddd]]]]
  290.       Returns the main vertical chain, so that a box can be    put
  291.       into other boxes (or other types of QLayout).
  292.  
  293.       Reimplemented    from QLayout.
  294.  
  295.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  296.       hhhhttttttttpppp::::////////wwwwwwwwwwww....ttttrrrroooollllllll....nnnnoooo////qqqqtttt////qqqqbbbbooooxxxxllllaaaayyyyoooouuuutttt....hhhhttttmmmmllll
  297.  
  298.      CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
  299.       Copyright 1992-1997 Troll Tech AS.  See the LICENSE file
  300.       included in the distribution for a complete license
  301.       statement.
  302.  
  303.      AAAAUUUUTTTTHHHHOOOORRRR
  304.       Generated automatically from the source code.
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                         (printed 9/22/98)
  328.  
  329.  
  330.  
  331.